<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="">
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
	<h2>测试ajax传值，取json值</h2>
	<button>send</button>
	<script type="text/javascript">
		$(function(){
			$("button").click(function(){
				//alert("ok");
				$.ajax({
					type:"post",
					url:"testajax2",
					data:{
						"stname":"temo",
						"stpass":"8888"
					},
					//dataType:"json",
					success:function(data){
						console.log(data);
					}
				}); 
				
			});
		});
	</script>
</body>
</html>